<?php

namespace App\Console\Commands;

use App\Console\Commands\Common\CommonCommand;
use App\Imports\DemoImport;
use App\Imports\LngLogImport;
use App\Models\Common\China;
use App\Models\Rbac\Permission;
use App\Models\User\PointLog;
use App\Models\User\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
use Maatwebsite\Excel\Facades\Excel;
use Kkokk\Poster\PosterManager;

class Demo extends CommonCommand {


    private $instance;

    public function handle() {

        $records = PointLog::query()->get();
        foreach ($records as $record) {
            $user = User::query()->find($record->user_id);
            $record->user_name = $user->name;
            $record->passport = $user->passport;
            $record->phone = $user->phone;
            $record->save();
        }


        /*$import = new DemoImport();
        Excel::import($import, public_path('1.xls'));
        return 0;*/
    }
}
